libxl: set stub domain size based on VRAM size
authorEric Shelton <eshelton@pobox.com>
Sat, 11 Jul 2015 21:30:42 +0000 (17:30 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 16 Jul 2015 15:20:50 +0000 (16:20 +0100)
commitd727bfcd0b6150825112def7eb50dfbb72f188f4
treebfe4031803d1d4e61b56064e6ce0f620623446c8
parent0c90a8d25a2cfe91ceec0729c2238c911768a0bf
libxl: set stub domain size based on VRAM size

Allocate additional memory to the stub domain for qemu-traditional if
more than 4 MB is assigned to the video adapter to avoid out of memory
condition for QEMU.

For LIBXL_VGA_INTERFACE_TYPE_STD + CIRRUS video_memkb is always at
least 4MB. However if LIBXL_VGA_INTERFACE_TYPE_STD is selected the
video_memkb defaults to 0, resulting in a stubdom which is 4MB smaller
than before. It seems unlikely that VGA disable would require more
memory then the other options, so this should be ok.

Signed-off-by: Eric Shelton <eshelton@pobox.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- added second paragraph of commit message ]
tools/libxl/libxl_dm.c